
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>
        活动管理
    </title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="css/main.css" media="all">
    <link rel="stylesheet" href="css/bootstrap.css">
    <script type="text/javascript" src="lib/loading/okLoading.js"></script>

</head>
<body>
<div class="x-nav">
            <span class="layui-breadcrumb">
              <a><cite>首页</cite></a>
              <a><cite>服务管理</cite></a>
              <a><cite>活动列表</cite></a>
            </span>
    <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right"  href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>
<div id="app">
<div class="x-body">
    <table class="layui-table">
        <thead>
        <tr>
            <th>
                社区名称
            </th>
            <th>
                活动标题
            </th>
            <th>
                活动地点
            </th>
            <th>
                开始时间
            </th>
            <th>
                截止时间
            </th>
            <th>
                状态
            </th>

        </tr>
        </thead>
        <tbody id="x-img">
        <tr v-for="(activity,index) in activityList">
            <td>{{activity.communityName}}</td>
            <td>{{activity.title}}</td>
            <td>{{activity.address}}</td>
            <td>{{activity.startTime}}</td>
            <td>{{activity.endTime}}</td>
            <td class="td-status">
                <span :class="activity.status == 0?'layui-btn layui-btn-blue':'layui-btn layui-btn-disabled'">
                    {{activity.status == 0?'活动已结束':'活动进行中'}}
                </span>
            </td>
        </tbody>
    </table>
</div>
</div>
<script src="lib/layui/layui.js" charset="utf-8"></script>
<script src="/js/vue.js" charset="utf-8"></script>
<script src="/js/axios.js" charset="utf-8"></script>
<script src="js/x-layui.js" charset="utf-8"></script>
<script>
   var app = new Vue({
        el:"#app",//声明当前Vue在页面的作用域
        data:{
            activityList:[],
            },
        created(){
                 axios.post("activity/userActivity/").then((res)=>{
                    app.activityList = res.data.data;
                });
        },

});

layui.use(['laydate','element','laypage','layer'], function(){
        $ = layui.jquery;//jquery
        laydate = layui.laydate;//日期插件
        lement = layui.element();//面包导航
        laypage = layui.laypage;//分页
        layer = layui.layer;//弹出层
        okLoading.close($)
        //以上模块根据需要引入

    });
</script>

</body>
</html>